package com.kekezu.kppw.dataprocess;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import android.content.Context;

import com.kekezu.kppw.data.TaskData;

public class TaskDP {
	/**
	 * 首页任务
	 * 
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getIndexTask(
			Context context) {
		return TaskData.getIndexTask(context);
	}

	/**
	 * 任务大厅
	 * 
	 * @param cateId
	 * @param tpye
	 * @param page
	 * @param strName
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getTask(String cateId,
			int tpye, int page, String strName, String strDesc, Context context) {
		return TaskData.getTask(cateId, tpye, page, strName, strDesc, context);
	}

	public static Map<String, String> getTask222(String cateId, int tpye,
			int page, String strName, String strDesc, Context context) {
		return TaskData.getTask222(cateId, tpye, page, strName, strDesc,
				context);
	}

	public static ArrayList<HashMap<String, Object>> getTask333(String str) {
		return TaskData.getTask333(str);
	}

	// 编辑任务
	public static Map<String, String> editTask(String taskId, Context context) {
		return TaskData.editTask(taskId, context);
	}

	/**
	 * 任务详情
	 * 
	 * @param taskId
	 * @param context
	 * @return
	 */
	public static Map<String, String> getTaskDetails(String taskId,
			Context context) {
		return TaskData.getTaskDetails(taskId, context);
	}

	/**
	 * 任务详情附件
	 * 
	 * @param str
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getAttachment(String str) {
		return TaskData.getAttachment(str);
	}

	/**
	 * 任务详情的任务稿件
	 * 
	 * @param str
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getWorkInfo(String str) {
		return TaskData.getWorkInfo(str);
	}

	/**
	 * 交付列表
	 * 
	 * @param id
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> deliveryList(String id,
			Context context) {
		return TaskData.deliveryList(id, context);
	}

	/**
	 * 维权列表
	 * 
	 * @param id
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> rightList(String id,
			Context context) {
		return TaskData.rightList(id, context);
	}

	/**
	 * 评价列表
	 * 
	 * @param id
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, String>> commentList(String id,
			Context context) {
		return TaskData.commentList(id, context);
	}

	/**
	 * 招标任务查看付款方式
	 * 
	 * @param taskId
	 * @param context
	 * @return
	 */
	public static Map<String, String> paySection(String taskId, Context context) {
		return TaskData.paySection(taskId, context);
	}

	/**
	 * 招标任务阶段列表
	 * 
	 * @param str
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getPaySection(String str) {
		return TaskData.getPaySection(str);
	}

	/**
	 * 雇主的任务列表
	 * 
	 * @param status
	 * @param page
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getGoodTask(int status,
			int page, String type, Context context) {
		return TaskData.getGoodTask(status, page, type, context);
	}

	/**
	 * 威客的任务列表
	 * 
	 * @param status
	 * @param page
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getWitkeyTask(int status,
			int page, String type, Context context) {
		return TaskData.getWitkeyTask(status, page, type, context);
	}

	/**
	 * 创建任务
	 */
	public static String[] creationTask(String strTaskid, String strTitle,
			String strDesc, String strCateId, String strBounty,
			String strWorkerNum, String strProvince, String strCity,
			String strDelivery, String strStatus, String strFileId,
			String strBeginAt, String strPhone, String strTaskType,
			String strSerId, Context context) {
		return TaskData.creationTask(strTaskid, strTitle, strDesc, strCateId,
				strBounty, strWorkerNum, strProvince, strCity, strDelivery,
				strStatus, strFileId, strBeginAt, strPhone, strTaskType,
				strSerId, context);
	}

	public static String bountyBidTask(String strid, Context context) {
		return TaskData.bountyBidTask(strid, context);
	}

	// 任务发布成功返回参数解析
	/**
	 * 订单创建完成后，返回的信息
	 * 
	 * @param string
	 * @return
	 */
	public static Map<String, String> getTaskBill(String string) {
		return TaskData.getTaskBill(string);
	}

	/**
	 * 获取增值服务
	 */
	public static ArrayList<HashMap<String, String>> getTaskService(
			Context context) {
		return TaskData.getTaskService(context);
	}

	/**
	 * 任务草稿箱
	 * 
	 * @param page
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getTaskDraft(int page,
			Context context) {
		return TaskData.getTaskDraft(page, context);
	}

	/**
	 * 我收藏的任务
	 * 
	 * @param page
	 * @param context
	 * @return
	 */
	public static ArrayList<HashMap<String, Object>> getMyFocus(int page,
			Context context) {
		return TaskData.getMyFocus(page, context);
	}

	/**
	 * 收藏任务
	 * 
	 * @param tasId
	 * @param context
	 * @return
	 */
	public static int addTaskFocus(String tasId, Context context) {
		return TaskData.addTaskFocus(tasId, context);
	}

	/**
	 * 删除我收藏的某个任务
	 * 
	 * @param tasId
	 * @param context
	 * @return
	 */
	public static int delTaskFocus(String tasId, Context context) {
		return TaskData.delTaskFocus(tasId, context);
	}

	/**
	 * 赏金托管之余额支付
	 * 
	 * @param taskId
	 * @param intType
	 * @param strPwd
	 * @param context
	 */
	public static String[] bountyByBalance(String taskId, int intType,
			String strPwd, Context context) {
		return TaskData.bountyByBalance(taskId, intType, strPwd, context);
	}

	/**
	 * 第三方支付
	 * 
	 * @param strTitle
	 * @param strCash
	 * @param strType
	 * @param strTaskId
	 * @param context
	 * @return
	 */
	public static String postCash(String strTitle, String strCash,
			String strType, String strTaskId, Context context) {
		return TaskData
				.postCash(strTitle, strCash, strType, strTaskId, context);
	}

	/**
	 * 招标任务保存付款方式
	 * 
	 * @param strTaskId
	 * @param payType
	 * @param strDesc
	 * @param append
	 * @param again
	 * @param context
	 * @return
	 */
	public static String[] postPayType(String strTaskId, int payType,
			String strDesc, String append, String again, Context context) {
		return TaskData.postPayType(strTaskId, payType, strDesc, append, again,
				context);
	}

	/**
	 * 招标任务威客同意或拒绝付款方式
	 * 
	 * @param strTaskId
	 * @param payType
	 * @param context
	 * @return
	 */
	public static String[] dealPayType(String strTaskId, String payType,
			Context context) {
		return TaskData.dealPayType(strTaskId, payType, context);
	}
}
